@use '@angular/material' as mat;

@mixin title-color($theme) {
  $config: mat.m2-get-color-config($theme);
  $foreground: map-get($config, foreground);
  $background: map-get($config, background);
  $primary: map-get($config, primary);
  $accent: map-get($config, accent);
  $warn: map-get($config, warn);

  .title {
    .typed-cursor {
      color: mat.m2-get-color-from-palette($primary);
    }
    &.style-v1,
    &.style-v2,
    &.style-v3,
    &.style-v4,
    &.style-v5 {
      .line-style {
        background: mat.m2-get-color-from-palette($foreground, divider);
        &:before {
          background: mat.m2-get-color-from-palette($primary);
        }
        .mat-icon {
          background: mat.m2-get-color-from-palette($primary, default-contrast);
          color: mat.m2-get-color-from-palette($primary);
        }
      }
    }
    &.style-v1 {
      .line-style {
        span {
          background: mat.m2-get-color-from-palette($background, card);
          border: 1px solid mat.m2-get-color-from-palette($primary);
        }
      }
    }
    &.style-v4 {
      .line-style {
        span {
          background: mat.m2-get-color-from-palette($background, card);
          border: 1px solid mat.m2-get-color-from-palette($primary);
        }
      }
    }
    &.banner-title {
      .title-header {
        background-color: mat.m2-get-color-from-palette($primary);
        color: mat.m2-get-color-from-palette($primary, default-contrast);
      }
    }
  }
}
